<!--{template common/header}-->
<!--{if !$_G['inajax'] && in_array($op, array('block', 'data', 'itemdata'))}-->
<div id="pt" class="bm cl">
	<!--{subtemplate common/simplesearchform}-->
	<div class="z">
		<a href="./" class="nvhm" title="{lang homepage}">$_G[setting][bbname]</a> <em>&rsaquo;</em>
		<a href="$_G[setting][navs][1][filename]">{lang portal}</a> <em>&rsaquo;</em>
		<a href="portal.php?mod=portalcp">{lang portal_manage}</a> <em>&rsaquo;</em>
		<a href="portal.php?mod=portalcp&ac=portalblock">{lang block_management}</a>
		<!--{if $bid}--> <em>&rsaquo;</em><a href="portal.php?mod=portalcp&ac=block&op=block&bid=$bid"><!--{if $block[name]}-->$block[name]<!--{else}--># $block[bid]<!--{/if}--></a><!--{/if}-->
	</div>
</div>

<div id="ct" class="ct2_a wp cl">
	<div class="mn">
		<div class="bm bw0">
			<div id="block_selection">

				<ul class="tb cl">
					<!--{if $allowmanage}-->
					<li id="li_setting"{if $op=="block"} class="a"{/if}><a href="portal.php?mod=portalcp&ac=block&bid=$bid&op=block{if $_GET[from]}&from=$_GET[from]{/if}">{lang block_properties}</a></li>
					<!--{/if}-->
					<!--{if $bid && !$is_htmlblock}-->
						<!--{if $allowmanage || $allowdata}-->
						<li id="li_data"{if $op=="data"} class="a"{/if}><a href="portal.php?mod=portalcp&ac=block&bid=$bid&op=data{if $_GET[from]}&from=$_GET[from]{/if}">{lang block_data}</a></li>
						<!--{/if}-->
					<!--{/if}-->
					<!--{if $is_recommendable}-->
					<li id="li_itemdata"{if $op=="itemdata"} class="a"{/if}><a href="portal.php?mod=portalcp&ac=block&bid=$bid&op=itemdata{if $_GET[from]}&from=$_GET[from]{/if}">{lang block_itemdata}</a></li>
					<!--{/if}-->
				</ul>
<!--{/if}-->

<!--{if $op == 'block'}-->
	<!--{if $_G[inajax]}-->
	<h3 class="flb">
		<em id="return_$_G[gp_handlekey]">{lang block_edit}</em>
		<span><a href="javascript:;" class="flbc" onclick="hideWindow('$_G[gp_handlekey]');{if empty($bid) && $_GET['from']!='cp'}drag.removeBlock('$_GET[eleid]',true);{/if}return false;" title="{lang close}">{lang close}</a></span>
	</h3>
	<ul class="tb cl">
		<li id="li_setting"{if $op=="block"} class="a"{/if}><a href="portal.php?mod=portalcp&ac=block&bid=$bid&op=block{if $_GET[from]}&from=$_GET[from]{/if}" onclick="showWindow('$_G[gp_handlekey]', this.getAttribute('href'));">{lang block_properties}</a></li>
		<!--{if $bid && !$is_htmlblock}-->
		<li id="li_data"{if $op=="data"} class="a"{/if}><a href="portal.php?mod=portalcp&ac=block&bid=$bid&op=data{if $_GET[from]}&from=$_GET[from]{/if}" onclick="showWindow('$_G[gp_handlekey]', this.getAttribute('href'));">{lang block_data}</a></li>
		<li id="li_style"{if $op=="style"} class="a"{/if}><a href="portal.php?mod=portalcp&ac=block&bid=$bid&op=style{if $_GET[from]}&from=$_GET[from]{/if}" onclick="showWindow('$_G[gp_handlekey]', this.getAttribute('href'));">{lang block_template}</a></li>
		<!--{/if}-->
		</ul>
	<!--{/if}-->
	<form id="blockformsetting" name="blockformsetting" method="post" autocomplete="off" action="portal.php?mod=portalcp&ac=block&op=block&classname=$_GET[classname]&bid=$block[bid]&blocktype=$blocktype&eleid=$_GET['eleid']&tpl=$_GET[tpl]"{if $_G[inajax]} onsubmit="if(checkblockname(this)){ajaxpost('blockformsetting','return_$_G[gp_handlekey]','return_$_G[gp_handlekey]','onerror');} else {return false;}"{else} onsubmit="return checkblockname(this);"{/if} class="fdiy">
		<div class="c diywin"{if $_G[inajax]} style="width: 420px; {if $_GET[from]=='cp'}max-height:260px;{else}max-height:380px;{/if}height:auto !important; height:320px; _padding-right: 0; _margin-right: 17px; overflow-y: auto;"{/if}>
			<div id="block_setting">
				<table class="tfm mbm">
					<!--{if $showhtmltip}-->
					<tr>
						<td colspan="2" style="color: red">
						{lang block_properties_comment}</td>
					</tr>
					<!--{/if}-->
					<tr>
						<th width="80">{lang block_id}</th>
						<td><input type="text" name="name" value="$block[name]" class="px" /></td>
					</tr>
					<tr>
						<th width="80">{lang block_type}</th>
						<td>
							<!--{eval list($bigclass) = explode('_',$block['blockclass']);}-->
							<!--{if !empty($_G['cache']['blockconvert']) && !empty($_G['cache']['blockconvert'][$bigclass][$block['blockclass']])}-->
								<select name="toblockclass" onchange="blockconver(this, '$block[bid]');" class="ps">
									<option value="$block[blockclass]">$blockclassname</option>
								<!--{loop $_G['cache']['blockconvert'][$bigclass][$block['blockclass']] $bblockclass $convertarr}-->
									<option value="$bblockclass">$convertarr[name]</option>
								<!--{/loop}-->
							</select>
							<img src="{IMGDIR}/faq.gif" alt="Tip" class="vm" style="margin: 0;" onmouseover="showTip(this)" tip="{lang block_type_convert_tips}" />
							<!--{else}-->
							$blockclassname
							<!--{/if}-->
						</td>
					</tr>
					<tr>
						<th width="80">{lang block_data_source}</th>
						<td>
							<select name="script" onchange="block_get_setting('$_GET[classname]', this.value, '$block[bid]');" class="ps">
							<!--{loop $theclass[script] $bkey $bname}-->
							<option value="$bkey"{$scriptarr[$bkey]}>$bname</option>
							<!--{/loop}-->
							</select>
						</td>
					</tr>
					<tr class="l">
						<th></th>
						<td>
							<a id="a_setting_show" href="javascript:;" onclick="toggleSettingShow();"class="xi2">{lang hide_setting}</a>
						</td>
					</tr>
					<tbody id="tbody_setting">
						<!--{subtemplate portal/portalcp_block_setting}-->
					</tbody>
					<!--{if !$is_htmlblock}-->
					<tr>
						<th width="80">{lang block_display_style}</th>
						<td>
							<select name="styleid" onchange="block_show_thumbsetting('$_GET[classname]', this.value, '$block[bid]')" class="ps">
							<!--{if $bid && $block[styleid]==0}-->
							<option value="0" selected>{lang diy_module}</option>
							<!--{/if}-->
							<!--{loop $theclass[style] $key $value}-->
							<!--{eval $thestyle = count($thestyle) > 1 ? $thestyle : $theclass['style'][$key];}-->
							<option value="$key"{$stylearr[$key]}>$value[name]</option>
							<!--{/loop}-->
							</select>
							<!--{if $blocktype}-->
							&nbsp;&nbsp;
							<input type="checkbox" class="pc" id="ck_hidedisplay" name="hidedisplay" value="1"{if $block[hidedisplay]} checked{/if} />
							<label for="ck_hidedisplay">{lang hidedisplay}</label>
							<img src="{IMGDIR}/faq.gif" alt="Tip" class="vm" style="margin: 0;" onmouseover="showTip(this)" tip="{lang hidedisplay_tips}" />
							<!--{/if}-->
						</td>
					</tr>
					<!--{/if}-->
					<tbody id="tbody_thumbsetting">
						<!--{subtemplate portal/portalcp_block_thumbsetting}-->
					</tbody>
					<!--{if !$is_htmlblock}-->
					<tr>
						<th width="80">{lang block_data_custom}</th>
						<td>
							<textarea name="summary" id="block_sumamry_$block[bid]" cols="40" rows="3" class="pt" style="display:none">$block[summary]</textarea>
							<p class="pns">
							<button type="button" id="a_summary_show" onclick="javascript:$('block_sumamry_$block[bid]').style.display='';$('a_summary_show').style.display='none';$('a_summary_hide').style.display='';return false;" class="pn"><em>{lang edit_diy_content}</em></button>
							<a id="a_summary_hide" href="javascript:;" onclick="javascript:$('block_sumamry_$block[bid]').style.display='none';$('a_summary_hide').style.display='none';$('a_summary_show').style.display='';return false;" style="display:none;">{lang hide}</a>
							</p>
						</td>
					</tr>
					<!--{/if}-->
				</table>
			</div>
		</div>
		<div class="o pns">
			<input type="hidden" name="blocksubmit" value="true" />
			<input type="hidden" name="handlekey" value="$_G['gp_handlekey']" />
			<input type="hidden" name="eleid" value="$_GET['eleid']" />
			<input type="hidden" name="formhash" value="{FORMHASH}" />
			<button type="submit" class="pn pnc"><strong>{lang confirms}</strong></button>
		</div>
	</form>
	<!--{if $_G[inajax]}-->
		<script type="text/javascript" reload="1">
		function succeedhandle_$_G[gp_handlekey] (url, message, values) {			
			<!--{if $_GET[from]=='cp'}-->
			location.reload();
			<!--{else}-->
			var bid = values['bid'];
			var eleid = typeof values['eleid'] == 'undefined' ? 0 : values['eleid'];
			var x = new Ajax();
			var openTitle = 0;
			drag.setClose();
			x.get('portal.php?mod=portalcp&ac=block&op=getblock&bid='+bid+'&tpl=$_GET[tpl]&inajax=1', function(s) {
				var obj = document.createElement('div');
				bid = 'portal_block_'+bid;
				obj.innerHTML = s;
				if ($(bid) != null) {
					drag.stopSlide(bid);
					if($(bid+'_content')) $(bid+'_content').parentNode.removeChild($(bid+'_content'));
					$(bid).innerHTML = obj.childNodes[0].innerHTML;
				} else {
					$(eleid).parentNode.replaceChild(obj.childNodes[0],$(eleid));
					openTitle = 1;
				}
				drag.initPosition();
				evalscript(s);
				if (openTitle == 1)	drag.openTitleEdit(bid);
			});
			<!--{/if}-->
			hideWindow('$_G[gp_handlekey]');
		}
		</script>
	<!--{/if}-->
<!--{elseif $op == 'data'}-->
	<!--{if $_G[inajax]}-->
	<h3 class="flb">
		<em id="return_$_G[gp_handlekey]">{lang block_data}</em>
		<span><a href="javascript:;" class="flbc" onclick="hideWindow('$_G[gp_handlekey]');{if empty($bid)}drag.removeBlock('$_GET[eleid]',true);{/if}return false;" title="{lang close}">{lang close}</a></span>
	</h3>
	<ul class="tb cl">
		<li id="li_setting"{if $op=="block"} class="a"{/if}><a href="portal.php?mod=portalcp&ac=block&bid=$bid&op=block{if $_GET[from]}&from=$_GET[from]{/if}" onclick="showWindow('$_G[gp_handlekey]', this.getAttribute('href'));">{lang block_properties}</a></li>
		<!--{if $bid && !$is_htmlblock}-->
		<li id="li_data"{if $op=="data"} class="a"{/if}><a href="portal.php?mod=portalcp&ac=block&bid=$bid&op=data{if $_GET[from]}&from=$_GET[from]{/if}" onclick="showWindow('$_G[gp_handlekey]', this.getAttribute('href'));">{lang block_data}</a></li>
		<li id="li_style"{if $op=="style"} class="a"{/if}><a href="portal.php?mod=portalcp&ac=block&bid=$bid&op=style{if $_GET[from]}&from=$_GET[from]{/if}" onclick="showWindow('$_G[gp_handlekey]', this.getAttribute('href'));">{lang block_template}</a></li>
		<!--{/if}-->
	</ul>
	<!--{/if}-->
	<form id="blockformdata" name="blockformdata" method="post" autocomplete="off" action="portal.php?mod=portalcp&ac=block&op=data&classname=$_GET[classname]&bid=$block[bid]&eleid=$_GET['eleid']&tpl=$_GET[tpl]"{if $_G[inajax]} onsubmit="ajaxpost('blockformdata','return_$_G[gp_handlekey]','return_$_G[gp_handlekey]','onerror');"{/if}>
		<div class="c"{if $_G[inajax]} style="width:420px; {if $_GET[from]=='cp'}max-height:260px;{else}max-height:380px;{/if}height:auto !important; height:320px; _padding-right: 0; _margin-right: 17px; overflow-y: auto;"{/if}>
			<div id="block_data">
				<table class="dt mtm mbm" style="table-layout:fixed">
					<tr>
						<th width="34">{lang locked}</th>
						<th width="50">{lang position}</th>
						<th>{lang title}</th>
						<th width="80">{lang operation}</th>
					</tr>
					<!--{loop $itemlist $item}-->
					<tr>
						<!--{if $item[ispreorder]}-->
						<td>
							{lang preorder}
						</td>
						<td>
							$item[displayorder]
						</td>
						<!--{else}-->
						<td>
							<input type="checkbox" name="locked[{$item[itemid]}]" value="1"{if $item[itemtype]=='1'} checked="checked"{/if} />
						</td>
						<td>
							<input type="text" name="displayorder[{$item[itemid]}]" class="px" size="2" maxlength="2" value="$item[displayorder]" />
						</td>
						<!--{/if}-->
						<td>$item['title']</td>
						<td>
							<a href="portal.php?mod=portalcp&ac=block&op=item&bid=$block[bid]&itemid=$item[itemid]{if $_G[inajax]}&itemfrom=ajax{/if}{if $_GET[from]}&from=$_GET[from]{/if}" onclick="showWindow('showblock', this.getAttribute('href'));">{lang edit}</a><span class="pipe">|</span>
							<!--{if $item[itemtype]=='1'}-->
							<a href="javascript:;" onclick="block_delete_item('$block[bid]', '$item[itemid]', 1, '{if $_G[inajax]}ajax{/if}', '{if $_GET[from]}$_GET[from]{/if}'); return false;">{lang delete}</a>
							<!--{else}-->
							<a href="javascript:;" onclick="block_delete_item('$block[bid]', '$item[itemid]', 0, '{if $_G[inajax]}ajax{/if}', '{if $_GET[from]}$_GET[from]{/if}'); return false;">{lang block_stop}</a>
							<!--{/if}-->
						</td>
					</tr>
					<!--{/loop}-->
				</table>
				<!--{if $block[param][bannedids]}-->
				<h4><a href="javascript:;" onclick="$('p_bannedids').style.display='block';return false;">{lang block_view_banned_data}</a></h4>
				<p id="p_bannedids" style="display:none;">
					<label>{lang block_data_block}</label>
					<input type="text" name="bannedids" value="$block[param][bannedids]" class="px" />
				</p>
				<!--{/if}-->
			</div>
		</div>
		<div class="o pns">
			<input type="hidden" name="eleid" value="$_GET['eleid']" />
			<input type="hidden" name="handlekey" value="$_G['gp_handlekey']" />
			<input type="hidden" name="updatesubmit" value="true" />
			<input type="hidden" name="formhash" value="{FORMHASH}" />
			<button type="submit" class="pn pnc"><strong>{lang update}</strong></button>
		</div>
	</form>
	<!--{if $_G[inajax]}-->
	<script type="text/javascript" reload="1">
	function succeedhandle_$_G[gp_handlekey] (url, message, values) {
		<!--{if $_GET[from]=='cp'}-->
		location.reload();
		<!--{else}-->
		var bid = values['bid'];
		var eleid = typeof values['eleid'] == 'undefined' ? 0 : values['eleid'];
		var x = new Ajax();
		var openTitle = 0;
		drag.setClose();
		x.get('portal.php?mod=portalcp&ac=block&op=getblock&bid='+bid+'&tpl=$_GET[tpl]&inajax=1{if $_GET[from]}&from=$_GET[from]{/if}', function(s) {
			var obj = document.createElement('div');
			bid = 'portal_block_'+bid;
			obj.innerHTML = s;
			if ($(bid) != null) {
				drag.stopSlide(bid);
				if($(bid+'_content')) $(bid+'_content').parentNode.removeChild($(bid+'_content'));
				$(bid).innerHTML = obj.childNodes[0].innerHTML;
			} else {
				$(eleid).parentNode.replaceChild(obj.childNodes[0],$(eleid));
				openTitle = 1;
			}
			drag.initPosition();
			evalscript(s);
			if (openTitle == 1)	drag.openTitleEdit(bid);
		});
		<!--{/if}-->
		hideWindow('$_G[gp_handlekey]');
	}
	</script>
	<!--{/if}-->

<!--{elseif $op == 'style'}-->
	<!--{if $_G[inajax]}-->
	<h3 class="flb">
		<em id="return_$_G[gp_handlekey]">{lang block_template}</em>
		<span><a href="javascript:;" class="flbc" onclick="hideWindow('$_G[gp_handlekey]');{if empty($bid)}drag.removeBlock('$_GET[eleid]',true);{/if}return false;" title="{lang close}">{lang close}</a></span>
	</h3>
	<ul class="tb cl">
		<li id="li_setting"{if $op=="block"} class="a"{/if}><a href="portal.php?mod=portalcp&ac=block&bid=$bid&op=block{if $_GET[from]}&from=$_GET[from]{/if}" onclick="showWindow('$_G[gp_handlekey]', this.getAttribute('href'));">{lang block_properties}</a></li>
		<!--{if $bid && !$is_htmlblock}-->
		<li id="li_data"{if $op=="data"} class="a"{/if}><a href="portal.php?mod=portalcp&ac=block&bid=$bid&op=data{if $_GET[from]}&from=$_GET[from]{/if}" onclick="showWindow('$_G[gp_handlekey]', this.getAttribute('href'));">{lang block_data}</a></li>
		<li id="li_style"{if $op=="style"} class="a"{/if}><a href="portal.php?mod=portalcp&ac=block&bid=$bid&op=style{if $_GET[from]}&from=$_GET[from]{/if}" onclick="showWindow('$_G[gp_handlekey]', this.getAttribute('href'));">{lang block_template}</a></li>
		<!--{/if}-->
	</ul>
	<!--{/if}-->	
	<form id="blockstyleform" name="blockformdata" method="post" autocomplete="off" action="portal.php?mod=portalcp&ac=block&op=style&classname=$_GET[classname]&bid=$block[bid]&eleid=$_GET['eleid']&tpl=$_GET[tpl]{if $_GET[from]}&from=$_GET[from]{/if}"{if $_G[inajax]} onsubmit="ajaxpost('blockstyleform','return_$_G[gp_handlekey]','return_$_G[gp_handlekey]','onerror');"{/if}>
		<div class="c"{if $_G[inajax]} style="width:420px; {if $_GET[from]=='cp'}max-height:260px;{else}max-height:380px;{/if}height:auto !important; height:320px; _padding-right: 0; _margin-right: 17px; overflow-y: auto;"{/if}>
			<!--{if $block[hidedisplay]}-->
			<div>
				<p style="color:red;">{lang portalcp_block_message1}</p>
				<p>	<b>{lang reference_call_data}:</b></p>
				<p>$samplecode</p>
				<p><b>{lang reference_call_field}:</b></p>
				<table width="100%">
					<!--{loop $theclass[fields] $key $value}-->
					 <tr>
						 <td>$value[name]</td>
						 <td><!--{echo '$'}-->$key</td>
					 </tr>
					 <!--{/loop}-->
				</table>
			</div>
			<!--{else}-->
			 <div id="block_style">
				<p class="pns mtn mbn"><button type="button" id="a_summary_show" onclick="$('stylename').style.display='';" class="pn"><em>{lang mod_save_to}</em></button></p>
				<p class="mtn mbm" id="stylename" style="display:none;">
					{lang mod_name}: <input type="text" name="name" class="px" />
					<br />
					{lang portalcp_block_message2}
				</p>
				<textarea name="template" rows="8" style="width: 98%;">$template</textarea>
			</div>
			 <table class="dt mtm mbm" width="98%" style="margin-top: 8px; border:1px;">
				 <tr>
					 <th>{lang grammar}</th>
					 <th>{lang statements}</th>
				 </tr>
				<!--{loop $theclass[fields] $key $value}-->
				 <tr>
					 <td>$value[name]</td>
					 <td>{{$key}}</td>
				 </tr>
				 <!--{/loop}-->
				 <tr>
					 <td>{lang current_data_order}</td>
					 <td>{{currentorder}}</td>
				 </tr>
				 <tr>
					 <td>{lang current_data_odd}</td>
					 <td>{{parity}}</td>
				 </tr>
				 <tr>
					 <td>{lang default_loop_content}</td>
					 <td>[loop]...[/loop]</td>
				 </tr>
				 <tr>
					 <td>{lang replace_loop_content}</td>
					 <td>[order=N]...[/order]</td>
				 </tr>
				 <tr>
					 <td>{lang special_data_content}</td>
					 <td>[index=N]...[/index]</td>
				 </tr>
				 <tr>
					 <td>{lang set_open_link}</td>
					 <td>&lt;a href="{{url}}"{{target}}&gt;{{title}}&lt;/a&gt;</td>
				 </tr>
				 <tr>
					 <td>{lang set_small_pic}</td>
					 <td>&lt;img src="{{pic}}" width="{{picwidth}}" height="{{picheight}}" /&gt;</td>
				 </tr>
				 <tr>
					 <td>{lang more_introduction}</td>
					 <td>{lang reference_message}</td>
				 </tr>
			</table>
			<!--{/if}-->
		</div>
		<div class="o pns">
			<input type="hidden" name="eleid" value="$_GET['eleid']" />
			<input type="hidden" name="handlekey" value="$_G['gp_handlekey']" />
			<input type="hidden" name="stylesubmit" value="true" />
			<input type="hidden" name="formhash" value="{FORMHASH}" />
			<button type="submit" class="pn pnc"><strong>{lang update}</strong></button>
		</div>
	</form>
	<!--{if $_G[inajax]}-->
	<script type="text/javascript" reload="1">
	function succeedhandle_$_G[gp_handlekey] (url, message, values) {
		<!--{if $_GET[from]=='cp'}-->
		location.reload();
		<!--{else}-->
		var bid = values['bid'];
		var eleid = typeof values['eleid'] == 'undefined' ? 0 : values['eleid'];
		var x = new Ajax();
		var openTitle = 0;
		drag.setClose();
		x.get('portal.php?mod=portalcp&ac=block&op=getblock&bid='+bid+'&tpl=$_GET[tpl]&inajax=1', function(s) {
			var obj = document.createElement('div');
			bid = 'portal_block_'+bid;
			obj.innerHTML = s;
			if ($(bid) != null) {
				drag.stopSlide(bid);
				if($(bid+'_content')) $(bid+'_content').parentNode.removeChild($(bid+'_content'));
				$(bid).innerHTML = obj.childNodes[0].innerHTML;
			} else {
				$(eleid).parentNode.replaceChild(obj.childNodes[0],$(eleid));
				openTitle = 1;
			}
			drag.initPosition();
			evalscript(s);
			if (openTitle == 1)	drag.openTitleEdit(bid);
		});
		<!--{/if}-->
		hideWindow('$_G[gp_handlekey]');
	}
	</script>
	<!--{/if}-->
<!--{elseif $op == 'itemdata'}-->
	<!--{if $datalist}-->
		<form id="blockformitemdata" name="blockformitemdata" method="post" autocomplete="off" action="portal.php?mod=portalcp&ac=block&op=itemdata&bid=$block[bid]{if $_GET[from]}&from=$_GET[from]{/if}">
			<table class="dt mtm mbm">
				<tr>
					<th width="40">{lang select}</th>
					<th>{lang title}</th>
					<th>{lang pass_moderate_time}</th>
					<th>{lang is_stick}</th>
					<th width="80">{lang operation}</th>
				</tr>
				<!--{loop $datalist $item}-->
				<tr>
					<td><input type="checkbox" class="pc" name="ids[]" value="$item[dataid]" /></td>
					<td><a href="$item[url]" target="_blank">$item['title']</a></td>
					<td>$item['verifiedtime']</td>
					<td><!--{if $item['stickgrade']}-->{lang stick} $item[stickgrade]<!--{else}-->{lang no}<!--{/if}--></td>
					<td>
						<a href="portal.php?mod=portalcp&ac=block&op=managedata&bid=$block[bid]&dataid=$item[dataid]{if $_GET[from]}&from=$_GET[from]{/if}" onclick="showWindow('showblock', this.getAttribute('href'));">{lang edit}</a>
					</td>
				</tr>
				<!--{/loop}-->
				<tr>
					<td><input type="checkbox" id="chkall" name="chkall" onclick="checkall(this.form, 'ids')" /></td>
					<td colspan="4">
						<input type="hidden" name="handlekey" value="$_G['gp_handlekey']" />
						<input type="hidden" name="deletesubmit" value="true" />
						<input type="hidden" name="formhash" value="{FORMHASH}" />
						<button type="submit" class="pn pnc"><strong>{lang delete}</strong></button>
					</td>
				</tr>
			</table>
			<!--{if $multi}--><div class="">$multi</div><!--{/if}-->
		</form>
	<!--{else}-->
		<p class="emp">{lang no_data_mod}</p>
	<!--{/if}-->
<!--{elseif $op == 'setting'}-->
	<!--{subtemplate portal/portalcp_block_setting}-->

<!--{elseif $op == 'item'}-->
	<script type="text/javascript" src="{$_G[setting][jspath]}calendar.js?{VERHASH}"></script>
	<h3 class="flb">
		<em id="return_$_G[gp_handlekey]">{lang block_edit}</em>
		<span>
			<!--{if $_GET[itemfrom]=='ajax'}--><a href="portal.php?mod=portalcp&ac=block&op=data&bid=$bid{if $_GET[from]}&from=$_GET[from]{/if}" onclick="showWindow('showblock', this.href);closecalendar(e);return false;"> &lt;&lt;{lang return} </a><!--{/if}-->
			<!--{if $_G[inajax]}--><a href="javascript:;" class="flbc" onclick="hideWindow('$_G[gp_handlekey]');{if empty($bid)}drag.removeBlock('$_GET[eleid]');{/if}return false;" title="{lang close}">{lang close}</a><!--{/if}-->
		</span>
	</h3>
	<form id="blockform" name="blockform" method="post" autocomplete="off" action="portal.php?mod=portalcp&ac=block&op=item&bid=$block[bid]&itemid=$itemid{if $_GET[from]}&from=$_GET[from]{/if}" onsubmit="ajaxpost('blockform','return_$_G[gp_handlekey]','return_$_G[gp_handlekey]','onerror');" enctype="multipart/form-data">
		<div class="c" style="height:$height; width: 420px; _padding-right: 0; _margin-right: 17px; overflow-y: auto;">
			<table class="tfm">
				<tr>
					<th>{lang block_data_from_datasource}</th>
					<td>
						<select id="push_idtype" class="ps">
							<option value="tids" selected="selected">{lang thread}</option>
							<option value="blogids">{lang blog}</option>
							<option value="aids">{lang article}</option>
							<option value="picids">{lang image}</option>
						</select>
						<input type="text" id="push_id" value=""/>
						<input type="button" value="{lang grab}" onclick="block_pushitem('$block[bid]', '$itemid')" class="btn" />
					</td>
				</tr>
				<tr>
					<th>{lang block_display_position}</th>
					<td>
						<select name="displayorder" class="ps">
						<!--{loop $orders $value}-->
							<option value="$value"$orderarr[$value]>$value</option>
						<!--{/loop}-->
						</select>
						&nbsp;&nbsp;
						<!--{if $itemid}-->
						<input type="checkbox" class="pc" name="locked" id="lock_item" onclick="$('tbody_orderitem').style.display=this.checked ? '' : 'none';" value="1"{if $item[itemtype]=='1'}checked="checked"{/if} />
						<label for="lock_item">{lang locked}</label>
						<!--{else}-->
						<input type="checkbox" class="pc" name="locked" id="lock_item" onclick="$('tbody_orderitem').style.display=this.checked ? '' : 'none';" value="1" checked="checked" disabled="disabled" />
						<label>{lang locked}</label>
						<!--{/if}-->
					</td>
				</tr>
				<tbody id="tbody_orderitem"{if $itemid && $item[itemtype]!='1'} style="display:none;"{/if}>
					<tr>
						<th>{lang block_start_time}</th>
						<td>
							<input type="text" class="px" name="startdate"{if $item[startdate]} value="$blockitem[startdate]"{/if} onclick="showcalendar(event, this, true)" />
							<p class="d">{lang block_start_time_comment}</p>
						</td>
					</tr>
					<tr>
						<th>{lang block_expire_time}</th>
						<td>
							<input type="text" class="px" name="enddate"{if $item[enddate]} value="$blockitem[enddate]"{/if} onclick="showcalendar(event, this, true)" />
							<p class="d">{lang block_expire_time_comment}</p>
						</td>
					</tr>
				</tbody>
				<tbody id="tbody_pushcontent">
				<!--{template portal/portalcp_block_itemfields}-->
				</tbody>
			</table>
		</div>
		<div class="o pns">
			<input type="hidden" name="itemsubmit" value="true" />
			<input type="hidden" name="handlekey" value="$_G['gp_handlekey']" />
			<input type="hidden" name="formhash" value="{FORMHASH}" />
			<button type="submit" class="pn pnc"><strong>{lang submit}</strong></button>
		</div>
	</form>
	<script type="text/javascript" reload="1">
		if (typeof ctitlepb_frame == 'object' && !BROWSER.ie) {delete ctitlepb_frame;}
		if (typeof csummarypb_frame == 'object' && !BROWSER.ie) {delete csummarypb_frame;}
		function succeedhandle_$_G['gp_handlekey'] (url, message, values) {
			<!--{if $_GET[itemfrom]=='ajax'}-->
			showWindow('$_G[gp_handlekey]', 'portal.php?mod=portalcp&ac=block&op=data{if $_GET[from]}&from=$_GET[from]{/if}&bid='+values['bid'], 'get' ,0);
			<!--{else}-->
			hideWindow('$_G[gp_handlekey]');
			location.reload();
			<!--{/if}-->
		}
	</script>

<!--{elseif $op == 'push'}-->
	<!--{template portal/portalcp_block_itemfields}-->

<!--{elseif $op == 'recommend'}-->
	<!--{if $isrepeatrecommend}-->
	<tr>
		<th>&nbsp;</th>
		<td><p>{lang data_repeat_recommend}</p></td>
	</tr>
	<!--{/if}-->
	<tr>
		<th>{lang need_moderate}</th>
		<td>
			<!--{if $perm[allowmanage] || !$perm[needverify]}-->
			<input type="checkbox" name="needverify" value="1" id="ck_needverify"{if !$item[isverified]} checked="checked"{/if} />
			<!--{else}-->
			<input type="checkbox" disabled="disabled" checked="checked" />
			<input type="hidden" name="needverify" value="1" />
			<!--{/if}-->
			<label for="ck_needverify"> {lang moderate_message}</label>
		</td>
	</tr>
	<!--{template portal/portalcp_block_itemfields}-->

<!--{elseif $op == 'verifydata'}-->
	<script type="text/javascript" src="{$_G[setting][jspath]}calendar.js?{VERHASH}"></script>
	<h3 class="flb">
		<em id="return_$_G[gp_handlekey]">{lang moderate_data}</em>
		<!--{if $_G[inajax]}--><span><a href="javascript:;" class="flbc" onclick="hideWindow('$_G[gp_handlekey]');return false;" title="{lang close}">{lang close}</a></span><!--{/if}-->
	</h3>
	<form id="dataform" name="dataform" method="post" autocomplete="off" action="portal.php?mod=portalcp&ac=block&op=verifydata&bid=$block[bid]&dataid=$dataid{if $_GET[from]}&from=$_GET[from]{/if}" onsubmit="ajaxpost('dataform','return_$_G[gp_handlekey]','return_$_G[gp_handlekey]','onerror');" enctype="multipart/form-data">
		<div class="c" style="height:$height; width: 420px; _padding-right: 0; _margin-right: 17px; overflow-y: auto;">
			<table class="tfm">
				<tbody id="tbody_pushcontent">
				<!--{template portal/portalcp_block_itemfields}-->
				</tbody>
				<tr>
					<th>{lang update_mod}</th>
					<td>
						<input type="checkbox" name="updateblock" id="ckupdateblock" value="1" />
						<label for="ckupdateblock">{lang update_mod_now}</label>
					</td>
				</tr>
			</table>
		</div>
		<div class="o pns">
			<input type="hidden" name="verifydatasubmit" value="true" />
			<input type="hidden" name="handlekey" value="$_G['gp_handlekey']" />
			<input type="hidden" name="formhash" value="{FORMHASH}" />
			<button type="submit" class="pn pnc"><strong>{lang passed}</strong></button>
		</div>
	</form>
	<script type="text/javascript" reload="1">
		function succeedhandle_$_G['gp_handlekey'] (url, message, values) {
			hideWindow('$_G[gp_handlekey]');
			location.reload();
		}
	</script>
<!--{elseif $op == 'managedata'}-->

	<script type="text/javascript" src="{$_G[setting][jspath]}calendar.js?{VERHASH}"></script>
	<h3 class="flb">
		<em id="return_$_G[gp_handlekey]">{lang edit_data}</em>
		<!--{if $_G[inajax]}--><span><a href="javascript:;" class="flbc" onclick="hideWindow('$_G[gp_handlekey]');return false;" title="{lang close}">{lang close}</a></span><!--{/if}-->
	</h3>
	<form id="dataform" name="dataform" method="post" autocomplete="off" action="portal.php?mod=portalcp&ac=block&op=managedata&bid=$block[bid]&dataid=$dataid{if $_GET[from]}&from=$_GET[from]{/if}" onsubmit="ajaxpost('dataform','return_$_G[gp_handlekey]','return_$_G[gp_handlekey]','onerror');" enctype="multipart/form-data">
		<div class="c" style="height:$height; width: 420px; _padding-right: 0; _margin-right: 17px; overflow-y: auto;">
			<table class="tfm">
				<tr>
					<th>{lang stick_level}</th>
					<td>
						<select name="stickgrade" class="ps">
							<option value="0"{if empty($item['stickgrade'])} selected{/if}>{lang not_stick}</option>
							<!--{loop range(1,10) $k}-->
							<option value="$k"{if $item['stickgrade']=='$k'} selected{/if}>{lang stick}$k</option>
							<!--{/loop}-->
						</select>
					</td>
				</tr>
				<tbody id="tbody_pushcontent">
				<!--{template portal/portalcp_block_itemfields}-->
				</tbody>
			</table>
		</div>
		<div class="o pns">
			<input type="hidden" name="managedatasubmit" value="true" />
			<input type="hidden" name="handlekey" value="$_G['gp_handlekey']" />
			<input type="hidden" name="formhash" value="{FORMHASH}" />
			<button type="submit" class="pn pnc"><strong>{lang submit}</strong></button>
		</div>
	</form>
	<script type="text/javascript" reload="1">
		function succeedhandle_$_G['gp_handlekey'] (url, message, values) {
			hideWindow('$_G[gp_handlekey]');
			location.reload();
		}
	</script>
<!--{elseif $op == 'thumbsetting'}-->
	<!--{subtemplate portal/portalcp_block_thumbsetting}-->
<!--{elseif $op == 'getblock'}-->
	<!--{if !$_G[inajax]}-->
	<div class="wp"><div class="area"><div class="frame move-span frame-1 cl">
	<!--{/if}-->
	$html
	<!--{if !$_G[inajax]}-->
	</div></div></div>
	<!--{/if}-->
<!--{elseif $op == 'convert'}-->
	<script type="text/javascript" reload="1">
		showWindow('showblock', 'portal.php?mod=portalcp&ac=block&op=block{if $_GET[from]}&from=$_GET[from]{/if}&bid='+$bid+'&tpl='+document.diyform.template.value, 'get', -1);
		drag.blockForceUpdate('portal_block_$bid');
	</script>
<!--{/if}-->

<!--{if !$_G['inajax'] && in_array($op, array('block', 'data', 'itemdata'))}-->
			</div>
		</div>
	</div>
	<div class="appl">
		<!--{subtemplate portal/portalcp_nav}-->
	</div>
</div>
<!--{/if}-->
<!--{template common/footer}-->